package com.sms.common;

import lombok.Builder;
import lombok.Data;

@Builder
@Data
public class A {
    private static Integer SUCCESS_CODE=200;
    private static Integer FAIL_CODE=500;
    private Integer code;
    private String message;

    private Object data;

    public static A success(String message){
        return A.builder().code(SUCCESS_CODE).message(message).build();
    }

    public static A success(String message,Object data){
        return A.builder().code(SUCCESS_CODE).message(message).data(data).build();
    }

    public static A fail(String message){
        return A.builder().code(FAIL_CODE).message(message).build();
    }

    public static A fail(String message,Object data){
        return A.builder().code(FAIL_CODE).message(message).data(data).build();
    }

}
